package com.lantosec.hmrp.modules.internal.entity;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.internal.vo.InternalItemVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 项目定义 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InternalItem extends BaseEntity<InternalItemVO> {

    private static final long serialVersionUID = 1L;
    public InternalItem(InternalItemVO vo){
        this.internalItemId = vo.getInternalItemId();
        this.internalItemName = vo.getInternalItemName();
        this.internalItemType = vo.getInternalItemType();
        this.internalTypeId = vo.getInternalTypeId();
        this.itemOrder = vo.getItemOrder();
    }

    @Override
    public InternalItemVO convertToVO(){
        return new InternalItemVO(this);
    }


    /**
     * 项目ID
     */
    @TableId(value = "internal_item_id", type = IdType.ASSIGN_UUID)
    private String internalItemId;

    /**
     * 项目名称/内容
     */
    private String internalItemName;

    /**
     * 项目类型(1科间互评 2科内互评 3评上级领导 4评院领导)
     */
    private Integer internalItemType;

    /**
     * 项目分类
     */
    private Integer internalTypeId;

    /**
     * 排序
     */
    private Integer itemOrder;


    public enum ColName {
        internal_item_id, internal_item_name, internal_item_type, internal_type_id, item_order,
    }
}
